namespace KPIS.GERP.Models.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class update0112 : DbMigration
    {
        public override void Up()
        {
            AddColumn("dbo.IcmAsset", "BgSourceId", c => c.Int());
            AddColumn("dbo.IcmOfficeSuppliesLot", "BgSourceId", c => c.Int());
            AddForeignKey("dbo.IcmAsset", "BgSourceId", "dbo.bgm_mas_source", "bgm_source_seq");
            AddForeignKey("dbo.IcmOfficeSuppliesLot", "BgSourceId", "dbo.bgm_mas_source", "bgm_source_seq");
            CreateIndex("dbo.IcmAsset", "BgSourceId");
            CreateIndex("dbo.IcmOfficeSuppliesLot", "BgSourceId");
        }
        
        public override void Down()
        {
            DropIndex("dbo.IcmOfficeSuppliesLot", new[] { "BgSourceId" });
            DropIndex("dbo.IcmAsset", new[] { "BgSourceId" });
            DropForeignKey("dbo.IcmOfficeSuppliesLot", "BgSourceId", "dbo.bgm_mas_source");
            DropForeignKey("dbo.IcmAsset", "BgSourceId", "dbo.bgm_mas_source");
            DropColumn("dbo.IcmOfficeSuppliesLot", "BgSourceId");
            DropColumn("dbo.IcmAsset", "BgSourceId");
        }
    }
}
